import request from '@/utils/request'
// 新增部分
export function addDepartments(data) {
  return request({
    url: '/company/department',
    method: 'post',
    data
  })
}
// 查询部门列表
export function getDepartments() {
  return request({
    url: '/company/department'
  })
}

// 修改部门信息
export function updataDepartments(data) {
  return request({
    url: `/company/department/${data.id}`,
    method: 'put',
    data // 请求体body
  })
}
// 删除部门
export function delDepartments(id) {
  return request({
    url: `/company/department/${id}`,
    method: 'delete'
  })
}
// 获取指定部门的数据
export function getDepartmentsDetail(id) {
  return request({
    url: `/company/department/${id}`
  })
}
